﻿using CNKI.TPI.Web.Base;
using CNKI.TPI.Web.Search.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CNKI.TPI.Web.Search.IBLL
{
    /// <summary>
    /// 
    /// </summary>
    public enum ShowType
    {
        /// <summary>
        /// 图片新闻栏目
        /// </summary>
        PicNews = 1,
        /// <summary>
        /// 文章新闻栏目
        /// </summary>
        ArticleNews = 2,
        /// <summary>
        /// 首页推荐栏目
        /// </summary>
        ArticleRecommend = 3,
        /// <summary>
        /// 站点公告栏目
        /// </summary>
        Notice = 4,
        /// <summary>
        /// 图片推荐栏目
        /// </summary>
        PicRecommend = 5,
        /// <summary>
        /// 跳转图片模板
        /// </summary>
        JumpTemplate = 12,
         /// <summary>
        /// 跳转文字模板
        /// </summary>
        JumpTemplateText = 13
    };
    /// <summary>
    /// 
    /// </summary>
    public enum ShowLocation
    {
        /// <summary>
        /// 左侧
        /// </summary>
        Left = 0,
        /// <summary>
        /// 右侧
        /// </summary>
        Right = 1,
    };
    /// <summary>
    /// 
    /// </summary>
    public enum TemplateType
    {
        /// <summary>
        /// 文字模板
        /// </summary>
        Article = 1,
        /// <summary>
        /// 图片模板
        /// </summary>
        Pic = 2,
    };
    /// <summary>
    /// 主页配置信息Service
    /// </summary>
    public interface IHomeService
    {
        /// <summary>
        /// 获得主页显示配置
        /// </summary>
        /// <returns>配置列表</returns>
        IList<SYS_CMS_NEWS_NEWSCONTENTCONFIG> GetHomepageConfig();

        /// <summary>
        /// 获得主页显示配置
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns>配置列表</returns>
        IList<SYS_CMS_NEWS_NEWSCONTENTCONFIG> GetHomepageConfig(ShowType type);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="location"></param>
        /// <param name="option"></param>
        /// <returns></returns>
        IList<SYS_CMS_NEWS_NEWSCONTENTCONFIG> GetHomepageConfig(ShowLocation location, PermissionOption option = PermissionOption.FilteringPermissions);

        /// <summary>
        /// 获得主页跳转模块信息
        /// </summary>
        /// <returns>跳转列表</returns>
        IList<SYS_CMS_NEWS_JUMPTEMPLATE> GetHomepageJumpConfig(ShowLocation location, PermissionOption option = PermissionOption.FilteringPermissions);
    }
}
